﻿using System;
using System.ComponentModel;
using SSLVerifier.API.ViewModels;

namespace SSLVerifier.API.ModelObjects {
	class StatusCounter : ViewModelBase {
		Int32 unknown, valid, pending, failed;
		
		public Int32 Unknown {
			get { return unknown; }
			set {
				unknown = value;
				OnPropertyChanged("Unknown");
			}
		}
		public Int32 Valid {
			get { return valid; }
			set {
				valid = value;
				OnPropertyChanged("Valid");
			}
		}
		public Int32 Pending {
			get { return pending; }
			set {
				pending = value;
				OnPropertyChanged("Pending");
			}
		}
		public Int32 Failed {
			get { return failed; }
			set {
				failed = value;
				OnPropertyChanged("Failed");
			}
		}

		public void Refresh() {
			Valid = Pending = Failed = 0;
		}
		public void Refresh(Int32 count) {
			Unknown = count;
			Refresh();
		}
	}
}
